﻿@model Cofoundry.Web.Identity.ForgotPasswordViewModel

<h1 class="mt-3">Forgotten your password?</h1>

<div class="row mt-4 mb-5">
    <div class="col col-4">

    @if (Context.Request.Method == "POST" && ViewData.ModelState.IsValid)
    {
        <p>Instructions on how to reset your password have been sent to your email address.</p>

        <div class="actions">
            <p id="forgotPasswordLink">
                <a href="@UrlLibrary.PartnerLogin()">Click here to login</a>
            </p>
        </div>
    }
    else
    {
        <form method="post">
            <p>Complete the form below to reset your password.</p>

            <div asp-validation-summary="ModelOnly" class="text-danger"></div>

            <div class="form-group">
                <label asp-for="Username"></label>
                <input asp-for="Username" class="form-control" placeholder="Email">
                <span asp-validation-for="Username" class="text-danger"></span>
            </div>
            <button type="submit" class="btn btn-primary">Reset password</button>
        </form>
    }

    </div>
</div>